import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    modelClick: '监听模型点击'
  },
  // getters: {
  //    getName: state => state.name
  // },
  mutations: {
     changeModel(state, name) {
       state.modelClick = name
     }
  },
  actions: {
    CHANGE_MODEL(context, name) {
      context.commit("changeModel", name)
    }
  },
  modules: {

  }
})
